// 通过递归的方法先拿到最后的值
function reverseList(head) {
  if (head == null || head.next == null) return head;
  let last = reverseList(head.next);
  head.next.next = head;
  head.next = null;
  return last;
}
